import request from '@/utils/request'
export function listMovie(query) {
  return request({
    url: '/movie/list',
    method: 'get',
    params: query
  })
}
export function getMovieById(id) {
  return request({
    url: '/movie/getMovieById/' + id,
    method: 'get',
  })
}
export function deleteMovie(ids) {
  return request({
    url: '/movie/deleteMovie/' + ids,
    method: 'delete',
  })
}
export function updateShow(id, show) {
  const data = {
    id,
    show
  }
  return request({
    url: '/movie/updateShowState',
    method: 'get',
    params: data
  })
}

export function addMovie(data) {
  return request({
    url: '/movie/addMovie',
    method: 'post',
    data: data
  })
}

export function updateMovie(data) {
  return request({
    url: '/movie/updateMovie',
    method: 'post',
    data: data
  })
}
